﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Way.Contract.Data;
using Way.EAP.DataAccess.Regulation;
using Way.EAP.DataAccess.Entity;

namespace Way.Bus.WMS.ST
{
    public class Common
    {
        public static string GetCustemerSQL(string sql)
        {
            return ("select * from (" + sql + ") a where a.isdisable =0 and a.ftype = '2'");
        }

        public static string GetNoticeMaterialsSQL(string sql, string cusid)
        {
            string w = "";
            if (!string.IsNullOrEmpty(cusid))
                w = " where a.STAY10 ='" + cusid + "'";
            return "select * from (" + sql + ") a " + w;
        }
        public static string GetMaterialsBatchSQL(string sql)
        {
            return "select a.*,b.BATCH,b.ISPERIOD,b.SEQUENCECODE,b.BARCODEFM from (" + sql + ") a,Acc_Bus_BusinessCommodity b where a.MATERIALCODE=b.id ";
        }

       
    }
}
